package com.mlc.mlcfes1;

import it.unimi.dsi.fastutil.ints.IntBigList;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class getscore implements CommandExecutor {

    public final Mlcfes1 plugin; // 你的主插件类

    public getscore(Mlcfes1 plugin) {
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, @NotNull String @NotNull [] strings) {
        FileConfiguration file = plugin.getConfig();

        String key = "Data." + commandSender.getName() + ".score";
        int score = 0;
        score = file.getInt(key);
        commandSender.sendMessage("你的分数：" + score);


        return false;
    }
}